<?php 


$files =  glob("./upload/*");


// var_dump($files);








 ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<form action="./upload.php" method="post" enctype="multipart/form-data">
		<input type="file" name="file[]" multiple="multiple">
		<!-- <input type="file" name="xbs"> -->
		<input type="submit" value="上传">
	</form>
	<table border="1">
		<tr>
			<td>预览</td>
			<td>文件名</td>
			<td>文件大小</td>
			<td>上传时间</td>
			<td>操作</td>
		</tr>
		<?php foreach ($files as $key => $file) { ?>
			<tr>
				<td><img width="30" src="<?php echo $file ?>" alt=""></td>
				<td><?php echo basename($file) ?></td>
				<td><?php echo filesize($file) ?></td>
				<td><?php echo filectime($file) ?></td>
				<td>
					<a href="./del.php?url=<?php echo $file; ?>">删除</a>
					<a href="">下载</a>
				</td>
			</tr>
		<?php } ?>
	</table>
</body>
</html>